<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ page import="java.util.*,
				 com.kylin.common.util.*,
				 com.kylin.common.paginate.*" %>
<%@ include file="/common/include/taglibs.jsp"%>
<%@ include file="/common/include/pageExpires.jsp"%>
<%@ include file="/common/include/dictNames.jsp"%>
<%@ page import="com.kylin.module.specials.orm.Special"%>
<br>
<b>《系统属性表 列表》</b>
<hr>

以下是系统中各模块使用到的所有属性
<br>
<form action="/admin/special/manageSpecial.do?CMD=search" method="post">

	<!-- 系统支持语言下拉菜单 对应字典名 Constants.SYSLANGUAGE -->
	<mytag:national name="language" value="<%=sessionLocale.toString()%>" dictName="<%=Constants.SYSLANGUAGE%>"/>

	<!-- 专题类别下拉菜单 对应字典名 dict_specials，参见 /common/include/dictNames.jsp -->                                    
	<mytag:select name="catspecial" language="all" dictName="<%=dict_specials%>"/>	

	<input type="text" name="keyword">
	<input type="submit" name="submit" value="查询">

</form>
<mytag:MyActionMsg />

<script type="text/javascript">
<!--
function toShow(){
    document.form1.submit();
}
//-->
</script>
<input type="button" onclick="toShow()" value="加为热点">
<table class='pageTable' cellspacing='0' cellpadding='0'>
<form name="form1" action="/admin/special/manageSpecial.do?CMD=addHot" method="post" >

     <tr>
     	<td class='pageTitle'></td>
        <td class='pageTitle'>ID号</td>
        <td class='pageTitle'>所属专题</td>
        <td class='pageTitle'>专题名称</td>
        <td class='pageTitle'>操作</td>
        <td class='pageTitle'>状态</td>
     </tr>
<%
		if (request.getAttribute(Constants.KEY_REQUEST_RESULT) != null) {
		DisplayPage dispage = (DisplayPage) request
		.getAttribute(Constants.KEY_REQUEST_RESULT);

		String ownUrl = "/admin/special/manageSpecial.do?CMD=search";
		String deleteUrl = "/admin/special/manageSpecial.do?CMD=delete&page="
		+ dispage.getPageNumber()
		+ "&searchId="
		+ dispage.getSearchId();
		String editUrl = "/admin/special/manageSpecial.do?CMD=update&page="
		+ dispage.getPageNumber()
		+ "&searchId="
		+ dispage.getSearchId();
		String specialDetailUrl = "/admin/special/manageSpecial.do?CMD=detailSpecial&id=";
		
		for (int i = 0; i < dispage.getList().size(); i++) {
			Special s = (Special) dispage.getList().get(i);
%>
<tr class='row<%=(i % 2)%>'>
	<td class='pageTd'>
		<input type="checkbox" name="ids" value="<%=s.getId()%>" />  
	</td>
	<td class='pageTd'>
		<%=s.getId()%>
	</td>
	<td class='pageTd'>
		<% if(s.getCatspecial() != null)out.print(s.getCatspecial().getName()); %>

	</td>
	<td class='pageTd'>
		<a href="<%=specialDetailUrl + s.getId()%>">
		<%=s.getTitle()%>
	</td>

	<td class='pageTd'>
	<a href="<%=editUrl + "&id=" + s.getId()%>">编辑</a>
		<a href="<%=deleteUrl + "&id=" + s.getId()%>">删除</a>
	</td>
	<td class='pageTd'>
		<%
			if(Special.ACTIVE_COMM.equals( s.getActive()))
				out.println("普通");
			if(Special.ACTIVE_HOT.equals( s.getActive()))
				out.println("热点");
			if(Special.ACTIVE_TOP.equals( s.getActive()))
				out.println("头条");
			if(Special.ACTIVE_HOT_TOP.equals( s.getActive()))
				out.println("热点且头条");

 		%>
	</td>
</tr>
<%
		}
		out.println("</table>");
		out.print(JspHelper.getPageBar(dispage,ownUrl));	
	} else {
		out.println("未找到记录");
	}
%>

